package com.scu.service;

import com.scu.dao.FriendlyLinkDao;
import com.scu.pojo.FriendlyLink;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional
public class FriendlyLinkServiceImpl implements FriendlyLinkService{
    @Autowired
    private FriendlyLinkDao friendlyLinkDao;

    @Override
    public List<FriendlyLink> getFriendlyLink() {
        return friendlyLinkDao.getFriendlyLink();
    }

    @Override
    public int addFriendlyLink(String link_name, String link_content) {
        return friendlyLinkDao.addFriendlyLink(link_name, link_content);
    }

    @Override
    public int updateFriendlyLink(FriendlyLink fk) {
        return friendlyLinkDao.updateFriendlyLink(fk);
    }

    @Override
    public int deleteFriendlyLink(int link_id) {
        return friendlyLinkDao.deleteFriendlyLink(link_id);
    }


}
